package array;

public class ArrayDemo4 {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5};//0-4
        //arr = null;
        System.out.println("arr = " + arr);//16进制的地址值
        //System.out.println("arr[5] = " + arr[3]);//访问内部空间
        //System.out.println("arr.length = " + arr.length);//调用属性
        System.out.println("arr.hashCode() = " + arr.hashCode());//调用方法

        System.out.println("---------------------");
        String[] strs = new String[3];//[null,null,null]

        //取出数组元素
        String str = strs[2];

        str = "Hello";

        //对象调用方法
        System.out.println("str.hashCode() = " + str.hashCode());
    }
}